<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs for page FileManager.php</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="file-name">/_inc/class/FileManager.php</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
							<a href="#sec-classes">Classes</a>
														</div>
	<div class="info-box-body">	
		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">File Manager Class, Furasta.Org</p>
<p class="description"><p>This is the Furasta.Org File Manager Class. It is intended to be used  to manage all of the writing to / reading from the user files  directory. The advantage of using this class over standard PHP functions  is that it accounts for all kinds of extra things like security, file  permissions (for furasta.org users, not system permissions) etc.</p><p>==== FILE PERMISSIONS ====</p><p>Furasta.Org file permissions work using two methods of approach:</p><p><ol><li>All users/groups have a file perm field in the database. This works
 	   along the same lines as the perm field in pages. This field
 	   is intended to overwrite the other file permissions and
	   consists of a list of users and groups who's files the user/group
	   can view/edit.</li><li>Each file has its own field in the database which states the name
 	   of the files, the type (dir or file), the permissions string for
	   who can view/edit it, the public status (whether its a publicly
	   viewable or private file) and the hash which is a unique md5 string
 	   which if the file is viewed in the browser by anyone, even if private,
 	   and this string is correctly added to the URL the file will be displayed.</li></ol></p><p>==== FILES DATABSE ====</p><p>The file manager class keeps a record of all files in the database.  The files are then named according to their unique identifier in the db,  that's how the class keeps track of the files database info. When getting  a directories contents an array of information on each file is returned  which contains the file name, id, permissions and location among other things.</p><p>==== ERRORS ====</p><p>The following map numbers to errors:</p><p>+--------+--------------------------------+  | Number | Error Description              |  +--------+--------------------------------+  |  0     | unknown error                  |  |  1     | read permission failure        |  |  2     | write permission failure       |  |  3     | view permission failure        |  |  4     | invalid path                   |  |  5     | system permission failure      |  |  6     | file/dir already exists        |  +--------+--------------------------------+</p><p>The error function can also be used to get further information on the  last error to occur.</p></p>
	<ul class="tags">
				<li><span class="field">author:</span> Conor Mac Aoidh &lt;<a href="mailto:conormacaoidh@gmail.com">conormacaoidh@gmail.com</a>&gt;</li>
				<li><span class="field">version:</span> 1.0</li>
				<li><span class="field">todo:</span> return errors in number format instead of boolean for better de-bugging and for language support   also add lastError function or something like that to see errors</li>
				<li><span class="field">license:</span> <a href="http://furasta.org/licence.txt">The BSD License</a></li>
			</ul>
		
			</div>
</div>
		
	<a name="sec-classes"></a>	
	<div class="info-box">
		<div class="info-box-title">Classes</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
			<span class="disabled">Classes</span>
																	</div>
		<div class="info-box-body">	
			<table cellpadding="2" cellspacing="0" class="class-table">
				<tr>
					<th class="class-table-header">Class</th>
					<th class="class-table-header">Description</th>
				</tr>
								<tr>
					<td style="padding-right: 2em; vertical-align: top">
						<a href="../admin_files/FileManager.html">FileManager</a>
					</td>
					<td>
											FileManager
										</td>
				</tr>
							</table>
		</div>
	</div>

	
	
	
	
	<p class="notes" id="credit">
		Documentation generated on Thu, 07 Jun 2012 18:22:46 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.4</a>
	</p>
	</div></body>
</html>